﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Guest.Master" AutoEventWireup="True" CodeBehind="Team.aspx.cs" Inherits="ScrumLite.WebUx.ProjectsViews.Team" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 
<h1><%=ViewData.ProjectName %></h1>
<hr />

<h2>Team</h2>
<br />
<div class="actions">
    <%=Html.ActionLink("Add Roles To Project", new { Controller = "Projects", Action = "ReadRoles" })%>&nbsp;&nbsp;
    <%=Html.ActionLink("Build Team", new { Controller = "Projects", Action = "MakeTeam" })%>&nbsp;
</div>
<br />
<p>
<strong>Internal</strong> (<a href="mailto:<%=ViewData.InternalPersonsMails %>">Mail to</a>)
<br />

<%
    
if (this.ViewData.InternalPersons == null)
{
    this.Response.Write("There are no internal persons asigned for this project.");
}
else
{ 
     
%>
    <ul>

    <% foreach (ScrumLite.Services.Contracts.PersonAssignation personAssignation in ViewData.InternalPersons)
       { %>
    <li>
        <%=personAssignation.Person.Name%> 
        
        
        (<%=Html.ActionLink("Abilites", new { Action = "Abilities", Controller = "People", personId = personAssignation.Person.Id })%>),
        
        (<%=Html.ActionLink("Education", new { Action = "Education", Controller = "People", personId = personAssignation.Person.Id })%>),
        
        (<a href="mailto:<%=personAssignation.Person.Mail %>"><%=personAssignation.Person.Mail%></a>)
        <br />
        <b>Assigned As:</b>
        <ul>
            <% foreach (ScrumLite.Services.Contracts.ProjectRole role in personAssignation.Roles)
               { %> 
		            <li><%=role.Name%> (<%=Html.ActionLink("Abilities", new { Action = "Abilities", Controller = "Projects", roleId = role.Id })%>)</li>
	        <%  } %>
        </ul>
        
        </li>
           
    <% } %>
          
    </ul>

<% } %>
</p>

<p>
<strong>External</strong> (<a href="mailto:<%=ViewData.ExternalPersonsMails %>">Mail to</a>)
<br />

<%  
    if (this.ViewData.ExternalPersons == null)
    {
        Response.Write("There are no external persons for this project.");
    }
    else
    { 
%>
        <ul>

        <% foreach (ScrumLite.Services.Contracts.PersonAssignation personAssignation in ViewData.ExternalPersons) { %>
        <li>
            <%=personAssignation.Person.Name%> 
            
            (<a href="mailto:<%=personAssignation.Person.Mail %>"><%=personAssignation.Person.Mail%></a>)
            <br />
            <b>Assigned To:</b>
            <ul>
                <% foreach (ScrumLite.Services.Contracts.ProjectRole role in personAssignation.Roles)
                   { %>
		            <li><%=role.Name %></li> 
	            <%  } %>
            </ul>
           
            </li>
               
        <% } %>
              
        </ul>
        
<% } %>        
</p>

<br />
<div class="actions">
    <%=Html.ActionLink("Add Roles To Project", new { Controller = "Projects", Action = "ReadRoles" })%>&nbsp;&nbsp;
    <%=Html.ActionLink("Build Team", new { Controller = "Projects", Action = "MakeTeam" })%>&nbsp;
</div>
</asp:Content>